<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php require_once(APP.'libs'.DS.'system_properties.php');?>
<html xmlns="http://www.w3.org/1999/xhtml" <?=SystemProperties::$platform=='renren'?'xmlns:xn="http:///www.renren.com/2009/xnml"':''?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>开心赚宝 - 首页</title>
<link href="<?php echo SystemProperties::$path;?>/css/style_<?php echo SystemProperties::$platform;?>.css?v=2011081107" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<?php echo SystemProperties::$path;?>/css/mediaboxAdvBlack.css" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo SystemProperties::$path_js;?>/js/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="<?php echo SystemProperties::$path_js;?>/js/try.js?v=20110322<?//microtime()?>"></script>
<script type="text/javascript" src="<?php echo SystemProperties::$path_js;?>/js/swfobject.js"></script>
<script src="<?php echo SystemProperties::$path_js;?>/js/mediaboxAdv-1.1.7.js?v=3" type="text/javascript"></script>

</head>
<body>
<?php if (SystemProperties::$platform == 'sina') { ?>
<!--div class="opthTopBg"><div class="opthHead"><a href="http://t.sina.com.cn" class="newlogo"></a></div></div-->
<?php } ?>


<div id="menu" class="menu">
		<?php require_once(APP.'views'.DS.'menu'.DS.'menu.ctp'); ?>
</div>
<!--div style="width:760px;font-size:12px;text-align:center;color:#555;line-height:20px;">亲爱的开心宝贝们,春节假期来临,我们将于2月2日至2月9日放假,假期遇到的问题可站内信留言给我们,上班后我们会给予回复,在此祝您新春快乐！</div-->
<div id="content" class="content">
</div>

<div class='bot'>
<?php if (SystemProperties::$platform == 'myspace') { ?>
<a href="http://messagingv2.myspace.cn/index.cfm?fuseaction=mail.messageV2&friendid=1311307572" target="_blank">&nbsp;</a>
<?php } else if  (SystemProperties::$platform == 'renren') { ?>
<a href="http://msg.renren.com/SendMessage.do?id=298825783" target="_blank">&nbsp;</a>
<a style="cursor:pointer" onclick="javascript:doChangePage('help', '')" target="_blank" style="width:80px">&nbsp;</a>
<?php } else if  (SystemProperties::$platform == 'yoka') { ?>
<a href="http://space.yoka.com/msg/send.php?to_uid=2517270" target="_blank">&nbsp;</a>
<?php } else if  (SystemProperties::$platform == 'sina') { ?>
<!--a href="user/logout" target="_top" style="width:55px">&nbsp;</a-->
<a href="<?=SystemProperties::get_profile_url(SystemProperties::$admin_uid)?>" target="_blank">&nbsp;</a>
<a href="http://t.sina.com.cn" target="_blank" style="width:80px">&nbsp;</a>
<a onclick="javascript:doChangePage('help', '')" target="_blank" style="width:80px">&nbsp;</a>
<?php } ?>
</div>


<?php if (SystemProperties::$platform == 'yoka'){ ?>
<script type="text/javascript">
var pageHeight = 0;
function wResize()
{
	pageHeight2 = document.body.scrollHeight;
	if (pageHeight2 != pageHeight)
	{
		pageHeight = pageHeight2;
		var url = 'http://space.yoka.com/pageproxy.html?method=resize&target=top&iframe=inner_plugin_iframe&height=' + (pageHeight + 116) + 'px';
		var inner_iframe = document.getElementById("inner_iframe");
		if (inner_iframe)
		{
			inner_iframe.src = url;
		}
		else
		{
			inner_iframe = document.createElement('iframe');
			inner_iframe.setAttribute('id', 'inner_iframe');
			inner_iframe.style.display = 'none';
			inner_iframe.src = url;
			document.body.appendChild(inner_iframe);
		}
	}
	setTimeout("wResize()", 3000);
}
window.addEvent('domready',wResize);
//if(window.attachEvent) window.attachEvent('onload', wResize); else window.addEventListener('load', wResize, false);
</script>	
<div style="height:200px">&nbsp;</div>
<?php } ?>


<?php 
$arr_map = array(
'convert'=>'menu_mb',
'report'=>'menu_mc',
'wangqi'=>'menu_md',
'help'=>'menu_me',
'details'=>'menu_ma',
'convertdetails'=>'menu_mb',
'myluck'=>'menu_mf',
'taobao'=>'menu_mg',
);
if(!empty($_REQUEST['type']) && !empty($arr_map[$_REQUEST['type']]) ){ ?>
    <script type="text/javascript">
    doChangePage(<?=json_encode($_REQUEST['type'])?>, <?=json_encode($arr_map[$_REQUEST['type']])?>)
    </script>
<?php } ?>




<script type="text/javascript" src="<?php echo SystemProperties::$path_js;?>/js/script_city.js"></script>
<div style="display:none" id="fake_a_div">
</div>

<?php if(empty($_REQUEST['type'])){ ?>
<script type="text/javascript">
window.addEvent('domready', function(){
    <?php
	if ($_SESSION['cutepig'] == 1 ){
		$catid = 2;
	}elseif (!empty($_SESSION['parterner']) && !empty(SystemProperties::$paterner_class[$_SESSION['parterner']])){
		$catid = intval(SystemProperties::$paterner_class[$_SESSION['parterner']]);
	}else {
		$catid = 0;
	}    
	?>
    goProduct(<?=$catid?>);
});
</script>	
<?php } ?>

<script type="text/javascript">
window.addEvent('domready', function (){

<?php 
if (!empty($_GET['type']) && $_GET['type'] =='details' && !empty($_GET['product_id'])) { 
	// cy add, 20110317
	if (empty($_GET['cyaparam'])){
		$cy_url_from = '';
	} else {
		$cy_url_from = '&cyaparam='.trim($_GET['cyaparam']);
	}
?>
showProduct("<?php echo intval($_GET['product_id']).$cy_url_from;?>");
<?php } ?>
<?php if (!empty($_GET['type']) && $_GET['type'] =='convertdetails' && !empty($_GET['product_id'])) { ?>
showChangeProduct(<?=intval($_GET['product_id'])?>);
<?php } ?>

<?php if (!empty($_GET['type']) && $_GET['type'] =='captcha' && !empty($_GET['code'])) { ?>
doPost('/user/showFillCaptchaInfo/'+'<?php echo $_GET['code'];?>', '', 'content');
<?php } ?>

<?php 
//指定打开特定的子页面
if (preg_match('/^[a-zA-Z_]+$/', $_GET['page'] , $ma) && preg_match('/^[0-9a-zA-Z_]*$/', $_GET['page_menu'] , $ma)) {	
?>
doChangePage('<?=$_GET['page']?>', '<?=empty($_GET['page_menu'])?'':$_GET['page_menu']?>');
<?php } ?>	

<?php if (!empty($_GET['type']) && $_GET['type'] =='cyshowinvite') { ?>
doChangePage('invite','');
<?php } ?>
<?php if (!empty($_GET['type']) && $_GET['type'] =='cyexchange') { ?>
doChangePage('convert','menu_mb');
<?php } ?>

});
</script>
<?php if (SystemProperties::$platform=='renren') { ?>
<script type="text/javascript" src="http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp"></script>
<script type="text/javascript">
$('content').addEvent('mousemove', setPos);
XN_RequireFeatures(["EXNML","CanvasUtil"], function()
{
  XN.Main.init("<?=SystemProperties::$api_key?>", "<?=SystemProperties::$app_host_webroot?>/xd_receiver.html");
  XN.CanvasClient.setCanvasHeight("300");
});
</script>
<?php } ?>

<?php if (SystemProperties::$platform=='sina') { ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21033025-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php } ?>


<?php if (SystemProperties::$platform=='renren') { ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21033025-3']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php } ?>

<?php if ('sina' == SystemProperties::$platform) { ?>
<script src="http://tjs.sjs.sinajs.cn/t35/apps/opent/js/frames/client.js" language="JavaScript"></script>
<?php } ?>



</body>
</html>
